package com.basic;

import com.frame.struts.BaseBean;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.utils.CommUtil;
import com.utils.DateConverter;

import javax.servlet.http.HttpServletResponse;

import org.apache.commons.beanutils.ConvertUtils;

import com.frame.struts.ActionContext;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */

public class FinInfoForm
	extends BaseBean {
	public FinInfoForm() {
	}
	
	  static{
	        ConvertUtils.register(new DateConverter(), Date.class);
	    }
	
    static{
        ConvertUtils.register(new DateConverter(), Date.class);
    }
	FinInfoEntity finInfo = new FinInfoEntity();

	public String addFinInfo() {
		HttpServletRequest request = ActionContext.getActionContext().
			getRequest();
		HttpServletResponse response = ActionContext.getActionContext().
			getResponse();
		BasicFactory factory = new BasicFactory();
		String qyid = (String) request.getSession().getAttribute("session_qyid");
		finInfo.setQyid(qyid);
		finInfo.setOptdate(new Date());
		finInfo.setOptrid(CommUtil.getUserId(request));
		try {
			if (factory.addFinInfo(finInfo)) {
				response.sendRedirect("/basic/modifyFinInfo.jsp");
			}
			else
			{
			    response.sendRedirect("/basic/failed.jsp");
			}
		}
		catch (Exception e) {

		}

		return null;
	}

	public String modifyFinInfo() {
		HttpServletRequest request = ActionContext.getActionContext().
			getRequest();
		HttpServletResponse response = ActionContext.getActionContext().
			getResponse();
		BasicFactory factory = new BasicFactory();
		String qyid = (String) request.getSession().getAttribute("session_qyid");
		finInfo.setQyid(qyid);
		finInfo.setOptdate(new Date());
		finInfo.setOptrid(CommUtil.getUserId(request));
		factory.deleteFinInfo(qyid);
		try {
			if (factory.addFinInfo(finInfo)) {
				response.sendRedirect("/basic/modifyFinInfo.jsp");
			}
			else
			{
			    response.sendRedirect("/basic/failed.jsp");
			}
		}
		catch (Exception e) {

		}

		return null;
	}

	public String getYhmc() {
		return finInfo.getYhmc();
	}

	public void setYhmc(String yhmc) {
		finInfo.setYhmc(yhmc);
	}

	public double getCkyebl() {
		return finInfo.getCkyebl();
	}

	/**
	 * @param ckyebl The ckyebl to set.
	 */
	public void setCkyebl(double ckyebl) {
		finInfo.setCkyebl(ckyebl);
	}

	/**
	 * @return finInfo.get return finInfo.gets the dkgdl.
	 */
	public double getDkgdl() {
		return finInfo.getDkgdl();
	}

	/**
	 * @param dkgdl The dkgdl to set.
	 */
	public void setDkgdl(double dkgdl) {
		finInfo.setDkgdl(dkgdl);
	}

	/**
	 * @return finInfo.get return finInfo.gets the dklxchl.
	 */
	public double getDklxchl() {
		return finInfo.getDklxchl();
	}

	/**
	 * @param dklxchl The dklxchl to set.
	 */
	public void setDklxchl(double dklxchl) {
		finInfo.setDklxchl(dklxchl);
	}

	/**
	 * @return finInfo.get return finInfo.gets the dqxycfl.
	 */
	public double getDqxycfl() {
		return finInfo.getDqxycfl();
	}

	/**
	 * @param dqxycfl The dqxycfl to set.
	 */
	public void setDqxycfl(double dqxycfl) {
		finInfo.setDqxycfl(dqxycfl);
	}

	/**
	 * @return finInfo.get return finInfo.gets the optdate.
	 */
	public Date getOptdate() {
		return finInfo.getOptdate();
	}

	/**
	 * @param optdate The optdate to set.
	 */
	public void setOptdate(Date optdate) {
		finInfo.setOptdate(optdate);
	}

	/**
	 * @return finInfo.get return finInfo.gets the optrid.
	 */
	public String getOptrid() {
		return finInfo.getOptrid();
	}

	/**
	 * @param optrid The optrid to set.
	 */
	public void setOptrid(String optrid) {
		finInfo.setOptrid(optrid);
	}

	/**
	 * @return finInfo.get return finInfo.gets the qyid.
	 */
	public String getQyid() {
		return finInfo.getQyid();
	}

	/**
	 * @param qyid The qyid to set.
	 */
	public void setQyid(String qyid) {
		finInfo.setQyid(qyid);
	}

	/**
	 * @return finInfo.get return finInfo.gets the recstate.
	 */
	public String getRecstate() {
		return finInfo.getRecstate();
	}

	/**
	 * @param recstate The recstate to set.
	 */
	public void setRecstate(String recstate) {
		finInfo.setRecstate(recstate);
	}

	/**
	 * @return finInfo.get return finInfo.gets the remark.
	 */
	public String getRemark() {
		return finInfo.getRemark();
	}

	/**
	 * @param remark The remark to set.
	 */
	public void setRemark(String remark) {
		finInfo.setRemark(remark);
	}

	/**
	 * @return finInfo.get return finInfo.gets the rgje.
	 */
	public String getRgje() {
		return finInfo.getRgje();
	}

	/**
	 * @param rgje The rgje to set.
	 */
	public void setRgje(String rgje) {
		finInfo.setRgje(rgje);
	}

	/**
	 * @return finInfo.get return finInfo.gets the zljzrq.
	 */
	public java.sql.Date getJzrq() {
		return finInfo.getJzrq();
	}

	/**
	 * @param zljzrq The zljzrq to set.
	 */
	public void setJzrq(java.sql.Date jzrq) {
		finInfo.setJzrq(jzrq);
	}
	public void setKhfl(String khfl)
	{
		finInfo.setKhfl(khfl);
	}
	public String getKhfl()
	{
		return finInfo.getKhfl();
	}
	public void setDkfxfl(String dkfxfl)
	{
		finInfo.setDkfxfl(dkfxfl);
	}
	public String getDkfxfl()
	{
		return finInfo.getDkfxfl();
	}
	public void setSxed(double sxed)
	{
		finInfo.setSxed(sxed);
	}
	public double getSxed()
	{
		return finInfo.getSxed();
	}
	public String getJgmc() {
		return finInfo.getJgmc();
	}

	public void setJgmc(String jgmc) {
		finInfo.setJgmc(jgmc);
	}
	
	public String getZljzrq() {
		return finInfo.getZljzrq();
	}

	public void setZljzrqc(String zljzrq) {
		finInfo.setZljzrq(zljzrq);
	}
/*	public float getDqdkqhl() {
		return finInfo.getDqdkqhl();
	}

	public void setDqdkqhl(float dqdkqhl) {
		finInfo.setDqdkqhl(dqdkqhl);
	}*/
	public String getComment() {
		return finInfo.getComment();
	}

	public void setComment(String comment) {
		finInfo.setComment(comment);
	}
}
